Can you find my mistake?
#!/bin/bash today = $(date +%Y-%m-%d) echo $today
It took me a few minutes to realize what I had done.
I still get caught by that in ksh. My other favorite shell mistake:s/\s*=\s*//;
$var="value"
Re:bash=perl
runrig on 2004-09-08T21:13:03
Oops, make that:s/\s*=\s*/=/;Re:bash!=perl
runrig on 2004-09-08T21:16:59
And the title was supposed to be bash => perl, but it may as well be the above. I should take more time to review my posts before I post:-) Re:bash=perl
Mr. Muskrat on 2004-09-08T23:16:04
Yep. I often find myself adding whitespace where it doesn't belong. I should be able to spot these mistakes immediately after this many times.:)